#set($title = "智能会议预定系统-管理员-用户-修改")<h2>$title</h2>
<form action="/users/modify/$!userModel.id" method="POST">
    <input type="hidden" name="id" value="$!userModel.id"/><input type="hidden" name="workerId" value="$!userModel.workerId"/><input type="hidden" name="createTime" value='$date.format("yyyy-MM-dd HH:mm:ss",$!userModel.createTime)'/>
    <table class="table">
        <thead>
            <tr>
                <td>
                    名称
                </td>
                <td>
                    值
                </td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    姓名
                </td>
                <td>
                    <input type="text" name="userName" value="$!userModel.userName"/>
                </td>
            </tr>
            <tr>
                <td>
                    工号
                </td>
                <td>
                    $!userModel.workerId
                </td>
            </tr>
            <tr>
                <td>
                    密码
                </td>
                <td>
                    <input type="text" name="pwd" value="$encrypt.decrypt($userModel.pwd)"/>
                </td>
            </tr>
            <tr>
                <td>
                    邮箱
                </td>
                <td>
                    <input type="text" name="email" value="$!userModel.email"/>
                </td>
            </tr>
            <tr>
                <td>
                    部门
                </td>
                <td>
                    <input type="text" name="department" value="$!userModel.department"/>
                </td> 
            </tr>
            <tr>
                <td>
                    启用
                </td>
                <td>
                    #selectTag("state",$options,$userModel.state)
                </td>
            </tr>
            <tr>
                <td>
                    分机
                </td>
                <td>
                    <input type="text" name="phone" value="$!userModel.phone"/>
                </td>
            </tr>
            <tr>
                <td>
                    角色
                </td>
                <td>
                    <input type="text" name="role" value="$!userModel.role"/>
                </td>
            </tr>
            <tr>
                <td>
                    权限
                </td>
                <td>
                    <div id="radioset">
                                <input type="radio" id="radio1" name="userRight" #if($!userModel.userRight==1)checked="checked"#end
                                    value="1" /> <label for="radio1" title="普通权限">
                                   普通权限 </label> <input type="radio" id="radio2" name="userRight" #if($!userModel.userRight==2)checked="checked"#end
                                    value="2" /> <label for="radio2" title="如1期4楼"> 特殊会议室
                                </label>
                                <input type="radio" id="radio3" name="userRight" #if($!userModel.userRight==3)checked="checked"#end
                                    value="3" /> <label for="radio3" title="周期预约"> 周期预约
                                </label>
                                <input type="radio" id="radio4" name="userRight" #if($!userModel.userRight==4)checked="checked"#end
                                    value="4" /> <label for="radio4" title="VIP"> VIP
                                </label>
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="row">
        <div class="span3 ">
            <button type="submit" class="ui-button-primary" value="修改">
                修改
            </button>
        </div>
        <div class="span3 ">
            <button type="button" href="/users/delete/$userModel.id" class="ui-button-error" value="删除">
                删除
            </button>
        </div>
        <div class="span3 ">
            <button type="button" href="/users/list" class="ui-button-success" value="返回">
                返回
            </button>
        </div>
        <div class="span3">
            <button type="button" href="/users/add" class="ui-button-success" value="新增">
                新增
            </button>
        </div>
    </div>
</form>
<script type="text/javascript">
    $(function(){
        $("button[href]").click(function(){
        
            window.location.href = $(this).attr("href");
        });
        $("#radioset").buttonset();
        $('.selectpicker').selectpicker();
    });
</script>
